package com.czz.ucenter.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @ClassName: User
 * @Author Czz
 * @Date 2019/12/11
 * @Time 10:37
 **/
@Data
@TableName(value = "system_user")
@Accessors(chain = true)
public class User {
    @TableId(value = "user_id", type = IdType.ID_WORKER_STR)
    private String id;

    @TableField(value = "user_mobile")
    private String mobile;

    @JsonIgnore
    @TableField(value = "user_password")
    private String password;

    @JsonIgnore
    @TableField(value = "user_salt")
    private String salt;

    @TableField(value = "user_nickname")
    private String nickname;

    @TableField(value = "user_sex")
    private Integer sex;

    @TableField(value = "user_avatar")
    private String avatar;

    @TableField(value = "user_email")
    private String email;

    @TableField(value = "user_status")
    private Integer status;

    @TableField(value = "is_teacher")
    private Integer teacher;

    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

}
